/* eslint-disable no-console */
// import { request } from 'umi';
// import { outLogin } from '@/services/ant-design-pro/api';
// import { getGreeProductsFromMysql, } from '@/services/ant-design-pro/api';
import { getProductStates_Err} from '@/services/ant-design-pro/influxdb';

/*  async function testloginRequest(body: API.LoginParams, options?: { [key: string]: any }) {
  return request<API.LoginResult>('http://greeshare.gree.com/pub/testlogin', {
    method: 'post',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

const testdata = await testloginRequest(loginparams)
console.log(testdata) */


/* let params1 ={
  current: 1,
  pageSize: 10,
}

const devlist = await getGreeProductsFromMysql(params1)
console.log(devlist.data)

const devstates = await getGreeProductStates("123456789","46006304228299")
console.log(devstates) 
*/
getProductStates_Err(3, "46006304228299")
  .then((devstates: API.Response) => {
    console.log("err:", devstates.data)
  }
  )

export default (props?: any) => {
  let devselect: any
  console.log("props:", props)
  console.log(props?.location?.query?.devselect || "aaa");
  if (props?.location?.query?.devselect) {
    devselect = JSON.parse(props?.location?.query?.devselect)
    console.log("devselect:", devselect)
  }
  return <div>New Page</div>;
};